Class: GOBL::Bill::Payment

Inherits:
Object show all
Defined in:
lib/generated/gobl/bill/payment.rb

Overview

A Payment is used to link an invoice or invoices with a payment transaction.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Payment structure

'https://gobl.org/draft-0/bill/payment'
TYPE_ENUM =

Enumeration of possible values for #type with their corresponding descriptions

{
  'request' => 'A payment request sent from the supplier to a customer indicating that they are
requesting a transfer of funds from the customer directly or a payer.
This is used to request payment for specific documents and invoices.',
  'advice' => 'A remittance advice sent from the customer to the supplier reflecting that payment for
the referenced documents has been made.',
  'receipt' => 'A payment receipt sent from the supplier to a customer indicating that they have
received a transfer of funds from the customer directly or a payer.
This is the default payment type and may be required by some tax
regimes in order to communicate the payment of specific documents and invoices.'
}.freeze

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#$addons($addons) ⇒ Array<GOBL::CBC::Key> (readonly)

Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document.

Returns:



46
# File 'lib/generated/gobl/bill/payment.rb', line 46

property :$addons, [GOBL::CBC::Key]

#$regime($regime) ⇒ GOBL::L10n::TaxCountryCode (readonly)



40
# File 'lib/generated/gobl/bill/payment.rb', line 40

property :$regime, GOBL::L10n::TaxCountryCode

#$tags($tags) ⇒ Array<GOBL::CBC::Key> (readonly)

Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags.

Returns:



51
# File 'lib/generated/gobl/bill/payment.rb', line 51

property :$tags, [GOBL::CBC::Key]

#codeGOBL::CBC::Code (readonly)

Code is a sequential identifier that uniquely identifies the payment. The code can be left empty initially, but is required to sign the document.

Returns:



90
# File 'lib/generated/gobl/bill/payment.rb', line 90

property :code, GOBL::CBC::Code

#complementsArray<GOBL::Schema::Object> (readonly)

Additional complementary objects that add relevant information to the payment.

Returns:



168
# File 'lib/generated/gobl/bill/payment.rb', line 168

property :complements, [GOBL::Schema::Object]

#currencyGOBL::Currency::Code (readonly)

Currency for all payment totals.



110
# File 'lib/generated/gobl/bill/payment.rb', line 110

property :currency, GOBL::Currency::Code

#customerGOBL::Org::Party (readonly)

Legal entity that receives the goods or services.

Returns:



136
# File 'lib/generated/gobl/bill/payment.rb', line 136

property :customer, GOBL::Org::Party

#exchange_ratesArray<GOBL::Currency::ExchangeRate> (readonly)

Exchange rates to be used when converting the payment’s monetary values into other currencies.

Returns:



115
# File 'lib/generated/gobl/bill/payment.rb', line 115

property :exchange_rates, [GOBL::Currency::ExchangeRate]

#extGOBL::Tax::Extensions (readonly)

Extensions for additional codes that may be required.



120
# File 'lib/generated/gobl/bill/payment.rb', line 120

property :ext, GOBL::Tax::Extensions

#issue_dateGOBL::Cal::Date (readonly)

When the payment was issued.

Returns:



95
# File 'lib/generated/gobl/bill/payment.rb', line 95

property :issue_date, GOBL::Cal::Date

#issue_timeGOBL::Cal::Time (readonly)

IssueTime is an optional field that may be useful to indicate the time of day when the payment was issued.

Returns:



100
# File 'lib/generated/gobl/bill/payment.rb', line 100

property :issue_time, GOBL::Cal::Time

#linesArray<PaymentLine> (readonly)

List of documents that are being paid for.

Returns:



146
# File 'lib/generated/gobl/bill/payment.rb', line 146

property :lines, [PaymentLine]

#metaGOBL::CBC::Meta (readonly)

Additional semi-structured data that doesn’t fit into the body of the invoice.

Returns:



173
# File 'lib/generated/gobl/bill/payment.rb', line 173

property :meta, GOBL::CBC::Meta

#methodGOBL::Pay::Instructions (readonly)

Details on how the payment was made based on the original instructions.



80
# File 'lib/generated/gobl/bill/payment.rb', line 80

property :method, GOBL::Pay::Instructions

#notesArray<GOBL::Org::Note> (readonly)

Unstructured information that is relevant to the payment, such as correction or additional legal details.

Returns:



163
# File 'lib/generated/gobl/bill/payment.rb', line 163

property :notes, [GOBL::Org::Note]

#orderingGOBL::Bill::Ordering (readonly)

Ordering allows for additional information about the ordering process including references to other documents and alternative parties involved in the order-to-delivery process.



152
# File 'lib/generated/gobl/bill/payment.rb', line 152

property :ordering, GOBL::Bill::Ordering

#payeeGOBL::Org::Party (readonly)

Legal entity that receives the payment if not the supplier.

Returns:



141
# File 'lib/generated/gobl/bill/payment.rb', line 141

property :payee, GOBL::Org::Party

#precedingArray<GOBL::Org::DocumentRef> (readonly)

Key information regarding previous versions of this document.

Returns:



125
# File 'lib/generated/gobl/bill/payment.rb', line 125

property :preceding, [GOBL::Org::DocumentRef]

#seriesGOBL::CBC::Code (readonly)

Series is used to identify groups of payments by date, business area, project, type, customer, a combination of any, or other company specific data. If the output format does not support the series as a separate field, it will be prepended to the code for presentation with a dash (‘-`) for separation.

Returns:



85
# File 'lib/generated/gobl/bill/payment.rb', line 85

property :series, GOBL::CBC::Code

#supplierGOBL::Org::Party (readonly)

The taxable entity who is responsible for supplying goods or services.

Returns:



130
# File 'lib/generated/gobl/bill/payment.rb', line 130

property :supplier, GOBL::Org::Party

#totalGOBL::Num::Amount (readonly)

Total amount to be paid in this payment, either positive or negative according to the line types and totals. Calculated automatically.

Returns:



157
# File 'lib/generated/gobl/bill/payment.rb', line 157

property :total, GOBL::Num::Amount

#typeGOBL::CBC::Key (readonly)

Type of payment document being issued.

Returns:



74
# File 'lib/generated/gobl/bill/payment.rb', line 74

property :type, GOBL::CBC::Key

#uuidString (readonly)

Universally Unique Identifier.

Returns:

  • (String)


56
# File 'lib/generated/gobl/bill/payment.rb', line 56

property :uuid, String

#value_dateGOBL::Cal::Date (readonly)

When the taxes of this payment become accountable, if none set, the issue date is assumed.

Returns:



105
# File 'lib/generated/gobl/bill/payment.rb', line 105

property :value_date, GOBL::Cal::Date